﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManterGenero.aspx.cs" Inherits="ManterGenero" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div class="demoheading" style="width:400px">Manter Gênero<br /></div> 
   
    <div class="collapsePanelHeader" style="width:400px; height:15px">Consultar Gêneros</div>
    <div style="width:405px; height: 399px;">
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <ContentTemplate>
                 
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataSourceID="odsGenero">
                    <Columns>
                        <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                            SortExpression="Codigo" />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                        <asp:BoundField DataField="Tipo" HeaderText="Tipo" 
                            SortExpression="Tipo" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lbAtualiza" runat="server" onclick="lbAtualiza_Click">Atualiza</asp:LinkButton>
                                &nbsp;
                                <asp:LinkButton ID="lbRemove" runat="server" onclick="lbRemove_Click">Remove</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                 
    <asp:ObjectDataSource ID="odsGenero" runat="server" 
        DataObjectTypeName="Negocios.Genero" DeleteMethod="Remover" 
        InsertMethod="Inserir" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="ConsultarTodos" TypeName="Negocios.GeneroBLL" 
        UpdateMethod="Atualizar"></asp:ObjectDataSource>
    <br />
    <div class="collapsePanelHeader" style="width:400px; height:15px"></div>
                 
                <table style="width: 100%" class="divDados">
                    <tr class="divOID">
                        <td style="width: 166px">
                            Código</td>
                        <td style="width: 750px">
                            <asp:TextBox ID="tdCodigo" runat="server" Enabled="False"></asp:TextBox>
                            <asp:Button ID="btNovo" runat="server" onclick="btNovo_Click" Text="Novo" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px; height: 26px;">
                            Nome</td>
                        <td style="width: 750px; height: 26px;">
                            <asp:TextBox ID="tdNome" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 166px">
                            Tipo</td>
                        <td style="width: 750px">
                            <asp:DropDownList ID="ddTipo" runat="server" Enabled="False" 
                                ToolTip="Escolha o tipo">
                                <asp:ListItem Value="0">Selecione o tipo</asp:ListItem>
                                <asp:ListItem Value="1">Pessoal</asp:ListItem>
                                <asp:ListItem Value="2">Geral</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <asp:Button ID="btGravar" runat="server" Text="Gravar" 
                                style="margin-right: 15px" Width="55px" Enabled="False" 
                                onclick="btGravar_Click" />
                            <asp:Button ID="btCancelar" runat="server" Text="Cancelar" Enabled="False" 
                                style="height: 26px" onclick="btCancelar_Click" />
                            <br />
                        </td>
                    </tr>
                </table>
                 <asp:Label ID="lbErro" runat="server" CssClass="erro"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    
</asp:Content>

